﻿#ifndef _DATASET_ITERATOR_H_H_
#define _DATASET_ITERATOR_H_H_

#include "udatabase/dll_cfg.h"
//#include "udatabase/interface/idatasetiterator.h"
#include "udatabase/interface/idatametainfos.h"
//#include "udatabase/interface/idatasource.h"
#include "udatabase/interface/idatasource.h"
#include "udatabase/interface/idatasetiterator.h"
#include "udatabase/interface/idataset.h"

using namespace FD::Utility::DB::Interface;

namespace FD{
	namespace Utility{
		namespace DB{
///<summary>
///数据集迭代器
///</summary>
class FD_DB_Export CDatasetIterator : public FD::Utility::DB::Interface::IDatasetIterator
{
public:
	/// <summary>
	/// 默认析构函数
	/// </summary>
	/// <param name=""></param>
	/// <returns></returns>
	virtual ~CDatasetIterator();
	/// <summary>
	/// 下一个数据集对象，如果超出范围，这返回NULL
	/// </summary>
	/// <param name=""></param>
	/// <returns></returns>
	virtual FD::Utility::DB::Interface::IDataset * next();
	/// <summary>
	/// 获取迭代器中数据集的个数
	/// </summary>
	/// <param name=""></param>
	/// <returns>数据集的个数</returns>
	virtual UINT32 getSize() const;
	/// <summary>
	/// 获取迭代器中数据集的类型
	/// </summary>
	/// <param name=""></param>
	/// <returns></returns>
	virtual FD::Utility::DB::Interface::DatasetType getDatasetType() const;
public:
	CDatasetIterator(FD::Utility::DB::Interface::IDataSource* ref_ds,FD::Utility::DB::Interface::DatasetType type);
private:
	FD::Utility::DB::Interface::DatasetType	m_type;
	IDataMetaInfos	*m_pMetaInfos;
	UINT32		m_index;
	FD::Utility::DB::Interface::IDataSource		*m_pDataSource;	
};






}}} // End of Namespace

#endif //_DATASET_ITERATOR_H_H_

